From: Brion Vibber Date: Mon, 9 Aug 2004 01:59:40 +0000 (+0000) Subject: Use ImageMagick's -background parameter to set the background color of X-Git-Tag: 1.5.0alpha1~2459 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=6a6411759e42f56db242269505bb769392b6f213;p=lhc%2Fweb%2Fwiklou.git Use ImageMagick's -background parameter to set the background color of transparent PNG thumbnails to white instead of default black. This will be shown in Internet Explorer 6 and will generally be less invasive (particularly for black-on-transparent line art!) Fix for [ 978664 ] Thumbnails of transparent PNGs bad in IE6 --- diff --git a/includes/Image.php b/includes/Image.php index e5b306e01d..29f6d867c6 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -162,8 +162,10 @@ class Image if ( (! file_exists( $thumbPath ) ) || ( filemtime($thumbPath) < filemtime($this->imagePath) ) ) { if ( $wgUseImageMagick ) { # use ImageMagick + # Specify white background color, will be used for transparent images + # in Internet Explorer/Windows instead of default black. $cmd = $wgImageMagickConvertCommand . - " -quality 85 -geometry {$width} ". + " -quality 85 -background white -geometry {$width} ". escapeshellarg($this->imagePath) . " " . escapeshellarg($thumbPath); $conv = shell_exec( $cmd );